export enum DiscordComponentType {
  // Legacy components (numeric for backwards compatibility)
  ActionRow = 1,
  Button = 2,

  // V2 components (string enums for easier debugging)
  Section = "SECTION",
  TextDisplay = "TEXT_DISPLAY",
  Thumbnail = "THUMBNAIL",
  ActionRowV2 = "ACTION_ROW",
  ButtonV2 = "BUTTON",
  SeparatorV2 = "SEPARATOR",
  ContainerV2 = "CONTAINER",
  MediaGalleryV2 = "MEDIA_GALLERY",
}

// Mapping from string enum values to Discord API numeric values
export const DISCORD_COMPONENT_TYPE_TO_NUMBER: Record<string, number> = {
  [DiscordComponentType.Section]: 9,
  [DiscordComponentType.TextDisplay]: 10,
  [DiscordComponentType.Thumbnail]: 11,
  [DiscordComponentType.ActionRowV2]: 1,
  [DiscordComponentType.ButtonV2]: 2,
  [DiscordComponentType.SeparatorV2]: 14,
  [DiscordComponentType.ContainerV2]: 17,
  [DiscordComponentType.MediaGalleryV2]: 12,
};
